<template>
	<router-view />
</template>
<script>
import { mapMutations } from '@lib/x_.js';
export default {
    created() {
    },
    mounted() {
        window.onresize = () => this.$store.commit('resetMobile');
        const userInfo = localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : {}
        const { resources,user } = userInfo
        this.$store.commit("setMenus",resources);
        this.$store.commit("setUser",user);
        if (Object.keys(userInfo).length === 0) {
            this.$router.push('/login')
        }
    },
    computed: {
        ...mapMutations(['resetMobile'])
    }
}
</script>
<style >
.red{
    color: #ff6600;
}
.green{
    color: #00cc66;
}
.orange{
    color: #ff9900
}
.blue{
    color: #3399ff;
}
html{
    height: 100%;

}
body{
    height: 100%;
    display: flex;
    flex-direction: column;
}
</style>